package com.avic.rong.shoppingCar.api;

import com.avic.rong.api.HttpPostService;
import com.avic.rong.utils.SharedPreferencesUtil;
import com.example.minato.minastore.BaseApi;
import com.example.minato.minastore.listener.HttpOnNextListener;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;

import io.reactivex.Observable;
import retrofit2.Retrofit;

/**
 * Created by Chenjiaxin on 2019/7/23 09:59
 * E-Mail Address：16601203965@163.com
 */
public class ShoppingCarBatchAddUserFavoritesApi extends BaseApi {

    private String token;
    private int type;
    private String targetIds;

    public ShoppingCarBatchAddUserFavoritesApi(RxAppCompatActivity rxAppCompatActivity, HttpOnNextListener listener, int type, String targetIds,String token) {
        super(rxAppCompatActivity, listener);
        this.type = type;
        this.token = token;
        this.targetIds = targetIds;
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostService service = retrofit.create(HttpPostService.class);
        return service.batchAddUserFavorites(SharedPreferencesUtil.getLoginToken(),type,targetIds);
    }

}
